package com.section4.service.Impl;


import com.section4.dao.StudentDao;
import com.section4.entity.Student;
import com.section4.entity.UpdateStudent;
import com.section4.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.UUID;

@Service
public class StudentServiceImpl implements StudentService {
    @Resource
    private StudentDao dao;
    @Override
    public int insert(Student student) {
        student.setSid(UUID.randomUUID().toString());
        return dao.insert(student);
    }

    @Override
    public int update(UpdateStudent student) {
        return dao.update(student);
    }
}
